The Data Model

The Data Model is basically the structure into which the records are extracted. It is the structure of all the fields and tables of an extracted record. The Data Model contains all the necessary information to be used in the creation of a template in the Designer module. The group of records generated from the Data Sample is called the Record Set and it is stored in the Unified Data Model (UDM) format.

The main advantage of the Data Model is that it is reusable, meaning that it be shared amongst different layouts and outputs created with the Connect Designer. This UDM also allows a same layout or output to be populated of data from different sources and formats without the need to modify it. This would be impossible without the universality of the UDM.

How to Use a Data Model?

The Data Model is simply a file containing that structure and all you need to do is to import that Data Model file into your data mapping configuration in order to be able to use it. When you import the Data Model, it appears in the Data Model pane where you can see all the fields and their types.

Once imported a Data Model can be modified. You can delete or add fields, or change their type. Once the data model is imported and all the fields properly set, all you need to do is extract the information. That is done simply via drag & drop.

The order in which these panes are displayed corresponds to the order in which they are normally used to create a data mapping configuration.

XML and Tabular Data

Multiple fields can be extracted by using a database or an XML file. To extract multiple fields inside a tabular data type or an XML, simply select all the fields and drag & drop them. Depending on where they are dropped, they will react a bit differently. When you drag & drop fields directly from the Viewer to the first field ID in the Data Model pane, it takes the number of fields and it overwrites the values inside the Data Model one after the other. If you have small corrections to make, like inverting the first and last names, simply override the individual fields. It will not create duplicate extractions; it will simply fix the current extraction.

If your Data Sample has fields that are named the same way as the imported Data Model, the simpler thing to do is to drag & drop them inside the record table itself, not directly on a field. When you do this, the DataMapper module automatically matches all the fields with the same name and adds any field that is not already there.

The Data Model can also contain detailed tables and nested tables. These are used in the same way: you can simply drag & drop your selection into the detail table to extract the data. However, as in a normal data mapping, a loop is needed before extracting detail lines. Once a loop has been created, you can select everything and drag & drop it into the detail table (see the Repeat step for more information about loops).

You can edit a Data Model directly from the Data Model pane. Right-click anywhere and a contextual menu will appear, depending on the location. If you right-click inside the record itself, you can add a field or a table. A field will simply be added at the end with no extraction, while a table will be added with no fields inside.

The Data Model pane acts as a Data Model editor. If you create a new data mapping configuration with nothing in it and your Data Model pane is empty, you can create it here and then export it. Remember that the Data Model has nothing to do with the type of data. It does not matter whether you do it from an XML, CSV or PDF.

TXT and PDF

Because PDF and text files do not have field names, but only areas from which data is extracted, it is a bit more useful to have a Data Model, especially with the right field names. When extracting data from a PDF or text file, you do have to go one line at a time or one field at a time because For example, if you select a whole address block from the Viewer and try to extract it into the data model address fields on the right, it is only going to map one field. If you split it, it will create different fields using that address.

For more information about the operations that can be performed on the Data Model, please refer to The Data Model Interface.